var params = {};
var current = {};
var defaultPageSize = 10;
var currentPage = 1;
var pageSize = defaultPageSize;
var option = {};
var wl=0;

$("ul.tabtit").on("click",function(event){
	$('.main_panel').load(webUrl+"public/page/contract/contractQuery.html");
});

function emptyContract(){
	$('.main_panel').load(webUrl+"public/page/contract/contractQuery.html");
}

$(function(){
	var id=localStorage.getItem("rowId");
	localStorage.removeItem("rowId");
	getHeaderLineById(id);
	
	$('.add').on('click',saveContractHeader);
	$('.empty').on('click',emptyContract);
	$('.check').on('click',queryParam);
	$("#salesmanName").bind('click',function(){employee()});
});

function queryParam(){
	finishedGoods(wl);
}

function queryCustomer(){
	option.url = webUrl+'customer/findChwCustomer.do';
	option.type="user";				//div名称前缀user_dialogbox
	option.table="customerGrid";	//div中table表名
	option.obj="customer";				//回调方法中传值做标识
	option.columns = [
	                  {field:'customerId',checkbox:true},
			          {field:'_itemNo',title:'序号',align:'center',width:50,formatter:formatId},
			          {field:'customerName',title:'客户名称',align:'center',width:150,sortable:true},
			          {field:'customerPhone',title:'联系方式',align:'center',width:150,sortable:true},
			          {field:'remark',title:'备注',align:'center',width:150,sortable:true},
			      ];
	option.onSelect=function(rowIndex, rowData){ $("#customerName").val(rowData.customerName);$("#customerId").val(rowData.customerId); };
	Lov(option);
}

function setPager(pager,total){
	pager.pagination({
		total:total,
		pageNumber:currentPage,
	    pageSize:defaultPageSize,
	    layout:['first','prev','links','next','last'],
	    onSelectPage:function(cpage, psize){
	    	currentPage=cpage;
	    	pageSize=psize;
	    	queryCustomer();
		}
	});
}

function setWlPager(pager,total){
	pager.pagination({
		total:total,
		pageNumber:currentWlPage,
	    pageSize:defaultWlPageSize,
	    layout:['first','prev','links','next','last'],
	    onSelectPage:function(cpage, psize){
	    	currentWlPage=cpage;
	    	pageWlSize=psize;
	    	finishedGoods(wl);
		}
	});
}

var su = 1;
function getHeaderLineById(id){
	$.ajax({
		url:webUrl+'contractHeader/getHeaderLineById.do',
		type:'post',
		data:{id:id}
	}).done(function(data){
		var d = data.bo;
		$("#contractHeaderId").val(d.chwContractHeader.contractHeaderId);
		//alert(JSON.stringify(d.chwContractHeader.contractNum));
		if(d.chwContractHeader.contractNum!=null){
			$("#contractNum").val(d.chwContractHeader.contractNum);
		}
		if(d.chwContractHeader.paymentTermId!=null){
			$("#paymentTermId").val(d.chwContractHeader.paymentTermId);
		}
		if(d.chwContractHeader.customerId!=null){
			$("#customerId").val(d.chwContractHeader.customerId);
			$("#customerName").val(d.chwContractHeader.customerName);
		}
		if(d.chwContractHeader.remark!=null){
			$("#remark").val(d.chwContractHeader.remark);
		}
		if(d.chwContractHeader.salesmanId!=null){
			$("#salesmanId").val(d.chwContractHeader.salesmanId);
		}
		if(d.chwContractHeader.salesmanName!=null){
			$("#salesmanName").val(d.chwContractHeader.salesmanName);
		}
		if(d.chwContractHeader.status!=null){
			$('#status').combobox('select', '完成');
		}
		if(d.chwContractHeader.signingDate!=null){
			//$('#signingDate').val(formatTime(d.chwContractHeader.signingDate));
			$('#signingDate').datebox('setValue',formatTime(d.chwContractHeader.signingDate));
		}
		if(d.chwContractHeader.implementDate!=null){
			//$('#implementDate').val(formatTime(d.chwContractHeader.implementDate));
			$('#implementDate').datebox('setValue',formatTime(d.chwContractHeader.implementDate));
		}
		if(d.chwContractHeader.completionDate!=null){
			//$('#paramValue').val(formatTime(d.chwContractHeader.completionDate));
			$('#paramValue').datebox('setValue',formatTime(d.chwContractHeader.completionDate));
		}
		var totalAmount=0;
		if(JSON.stringify(d.chwContractLine)!="null"){
			for(var i =0;i<d.chwContractLine.length;i++){
				//alert(JSON.stringify(d.chwContractLine[i]));
				var tbl = document.getElementById("fixedThead");
				var rowSize = tbl.rows.length;
				var row = tbl.insertRow(rowSize);
				var cell0 = row.insertCell(0);
				var cell1 = row.insertCell(1);
				var cell2 = row.insertCell(2);
				var cell3 = row.insertCell(3);
				var cell4 = row.insertCell(4);
				var cell5 = row.insertCell(5);
				var cell6 = row.insertCell(6);
				var cell7 = row.insertCell(7);
				var cell8 = row.insertCell(8);
				var cell9 = row.insertCell(9);
				var cell10 = row.insertCell(10);
				var cell11 = row.insertCell(11);
				var cell12 = row.insertCell(12);
				var cell13 = row.insertCell(13);
				cell0.innerHTML = "<input   type='checkbox' name='checkLines' style='width:35px'  /> ";
				cell1.innerHTML = su;
				cell2.innerHTML = "<input   name='contractLineNum_"+su+"' id='contractLineNum_"+su+"' style='width:120px' value='"+d.chwContractLine[i].contractLineNum+"'/>"//合同行号
				cell3.innerHTML = "<input   name='segment1_"+su+"' id='segment1_"+su+"' style='width:50px' readonly='true'  value='"+d.chwContractLine[i].constructionCost2+"'/>"//物料编码
				cell4.innerHTML = "<input   name='finishedGoodsId_"+su+"' id='finishedGoodsId_"+su+"' value='"+d.chwContractLine[i].finishedGoodsId+"' style='width:120px'  type='hidden'/><input   name='finishedGoodsName_"+su+"' value='"+d.chwContractLine[i].finishedGoodsName+"' onclick='finishedGoods("+su+")' id='finishedGoodsName_"+su+"' style='width:120px' />"//成品id
				cell5.innerHTML = "<input   name='materielVersionNum_"+su+"' id='materielVersionNum_"+su+"' style='width:50px' readonly='true' value='"+d.chwContractLine[i].taxRate+"'/>"//版本编号
				cell6.innerHTML = "<input   name='materielVersionName_"+su+"' id='materielVersionName_"+su+"' style='width:50px' readonly='true' value='"+d.chwContractLine[i].intaxmoneyNumber+"'/>"//版本名称
				cell7.innerHTML = "<input   name='materielVersionModel_"+su+"' id='materielVersionModel_"+su+"' style='width:50px' readonly='true' value='"+d.chwContractLine[i].taxmoneyNumber+"'/>"//版本型号
				cell8.innerHTML = "<input   name='quantity_"+su+"' id='quantity_"+su+"' value='"+d.chwContractLine[i].quantity+"' style='width:50px' onblur='sum("+su+")'/>"//数量
				cell9.innerHTML = "<input   name='salesUnitPrice_"+su+"' id='salesUnitPrice_"+su+"'  value='"+d.chwContractLine[i].salesUnitPrice+"'  style='width:100px' onblur='sum("+su+")'/>"//销售单价
				cell10.innerHTML = "<input   name='constructionCost1_"+su+"' id='constructionCost1_"+su+"'  value='"+d.chwContractLine[i].constructionCost1+"' style='width:100px' onblur='sum("+su+")'/>"//施工费1
				cell11.innerHTML = "<input   name='constructionCost3_"+su+"' id='constructionCost3_"+su+"' style='width:100px' value='"+d.chwContractLine[i].constructionCost3+"' onblur='sum("+su+")'/>"//施工费3
				cell12.innerHTML = "<input   name='totalAmount_"+su+"' id='totalAmount_"+su+"' style='width:100px' value='"+d.chwContractLine[i].totalAmount+"' readonly='true'/>"//总金额
				/*if(d.chwContractLine[i].taxRate=="0"){
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option selected='selected' value='"+ d.chwContractLine[i].taxRate+"'>"+ d.chwContractLine[i].taxRate * 100+"%</option><option value='0.03'>3%</option><option value='0.06'>6%</option><option value='0.11'>11%</option><option value='0.13'>13%</option><option value='0.17'>17%</option></select>";
				}else if(d.chwContractLine[i].taxRate=="0.06"){
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option selected='selected' value='"+ d.chwContractLine[i].taxRate+"'>"+ d.chwContractLine[i].taxRate * 100+"%</option><option value='0'>0%</option><option value='0.03'>3%</option><option value='0.11'>11%</option><option value='0.13'>13%</option><option value='0.17'>17%</option></select>";
				}else if(d.chwContractLine[i].taxRate=="0.03"){
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option selected='selected' value='"+ d.chwContractLine[i].taxRate+"'>"+ d.chwContractLine[i].taxRate * 100+"%</option><option value='0'>0%</option><option value='0.06'>6%</option><option value='0.11'>11%</option><option value='0.13'>13%</option><option value='0.17'>17%</option></select>";
				}else if(d.chwContractLine[i].taxRate=="0.11"){
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option selected='selected' value='"+ d.chwContractLine[i].taxRate+"'>"+ d.chwContractLine[i].taxRate * 100+"%</option><option value='0'>0%</option><option value='0.03'>3%</option><option value='0.06'>6%</option><option value='0.13'>13%</option><option value='0.17'>17%</option></select>";
				}else if(d.chwContractLine[i].taxRate=="0.13"){
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option selected='selected' value='"+ d.chwContractLine[i].taxRate+"'>"+ d.chwContractLine[i].taxRate * 100+"%</option><option value='0'>0%</option><option value='0.03'>3%</option><option value='0.06'>6%</option><option value='0.11'>11%</option><option value='0.17'>17%</option></select>";
				}else if(d.chwContractLine[i].taxRate=="0.17"){
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option selected='selected' value='"+ d.chwContractLine[i].taxRate+"'>"+ d.chwContractLine[i].taxRate * 100+"%</option><option value='0'>0%</option><option value='0.03'>3%</option><option value='0.06'>6%</option><option value='0.11'>11%</option><option value='0.13'>13%</option></select>";
				}else{
					cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px' ><option  selected='selected' value=''>请选择</option><option   value='0'>0%</option><option value='0.03'>3%</option><option value='0.06'>6%</option><option value='0.11'>11%</option><option value='0.13'>13%</option><option value='0.17'>17%</option></select>";
				}
*/				cell13.innerHTML = "<input   name='remark_"+su+"' id='remark_"+su+"'  style='width:100px' value='"+d.chwContractLine[i].remark+"'/><input   type='hidden' id='contractLineId_"+su+"' value='"+d.chwContractLine[i].contractLineId+"'  />"//备注
				var index = document.getElementById("fixedThead").getElementsByTagName('tr').length;
				totalAmount=Number(totalAmount)+Number(d.chwContractLine[i].totalAmount);
				su++;
			}
		}
		$("#TOTAL_AMOUNT").val(totalAmount);
		
	});
}

function formatTime(val){
	if (val != null) {
		var date = new Date(val);
		return date.getFullYear() + '-' + (date.getMonth() + 1) + '-'+ date.getDate();
	}
}

function addline() {
	var tbl = document.getElementById("fixedThead");
	var rowSize = tbl.rows.length;
	var row = tbl.insertRow(rowSize);
	var cell0 = row.insertCell(0);
	var cell1 = row.insertCell(1);
	var cell2 = row.insertCell(2);
	var cell3 = row.insertCell(3);
	var cell4 = row.insertCell(4);
	var cell5 = row.insertCell(5);
	var cell6 = row.insertCell(6);
	var cell7 = row.insertCell(7);
	var cell8 = row.insertCell(8);
	var cell9 = row.insertCell(9);
	var cell10 = row.insertCell(10);
	var cell11 = row.insertCell(11);
	var cell12 = row.insertCell(12);
	var cell13 = row.insertCell(13);
	cell0.innerHTML = "<input   type='checkbox' name='checkLines' style='width:35px'  /> ";
	cell1.innerHTML = su;
	cell2.innerHTML = "<input   name='contractLineNum_"+su+"' id='contractLineNum_"+su+"' style='width:120px' />"//合同行号
	cell3.innerHTML = "<input   name='segment1_"+su+"' id='segment1_"+su+"' style='width:50px' readonly='true'/>"//物料编码
	cell4.innerHTML = "<input   name='finishedGoodsId_"+su+"' id='finishedGoodsId_"+su+"' style='width:120px'  type='hidden'/><input   name='finishedGoodsName_"+su+"' onclick='finishedGoods("+su+")' id='finishedGoodsName_"+su+"' style='width:120px' />"//成品id
	cell5.innerHTML = "<input   name='materielVersionNum_"+su+"' id='materielVersionNum_"+su+"' style='width:50px' readonly='true'/>"//版本编号
	cell6.innerHTML = "<input   name='materielVersionName_"+su+"' id='materielVersionName_"+su+"' style='width:50px' readonly='true'/>"//版本名称
	cell7.innerHTML = "<input   name='materielVersionModel_"+su+"' id='materielVersionModel_"+su+"' style='width:50px' readonly='true'/>"//版本型号
	
	cell8.innerHTML = "<input   name='quantity_"+su+"' id='quantity_"+su+"' style='width:50px' onblur='sum("+su+")'/>"//数量
	cell9.innerHTML = "<input   name='salesUnitPrice_"+su+"' id='salesUnitPrice_"+su+"'  style='width:100px' onblur='sum("+su+")'/>"//销售单价
	cell10.innerHTML = "<input   name='constructionCost1_"+su+"' id='constructionCost1_"+su+"' style='width:100px' onblur='sum("+su+")'/>"//施工费1
	/* cell6.innerHTML = " <input   name='constructionCost2_"+su+"'  id='constructionCost2_"+su+"' style='width:100px' /> "//施工费2 */
	cell11.innerHTML = "<input   name='constructionCost3_"+su+"' id='constructionCost3_"+su+"' style='width:100px' onblur='sum("+su+")'/>"//配件费
	cell12.innerHTML = "<input   name='totalAmount_"+su+"' id='totalAmount_"+su+"' style='width:100px' readonly='true'/>"//总金额
	/* cell9.innerHTML = "<select name='taxRate_"+su+"' id='taxRate_"+su+"' style='width:100px'><option value='请选择' >请选择</option><option value='0'>0%</option><option value='0.03'>3%</option><option value='0.06'>6%</option><option value='0.11'>11%</option><option value='0.13'>13%</option><option value='0.17'>17%</option></select>"//税率
	cell10.innerHTML = "<input   name='taxmoneyNumber_"+su+"' id='taxmoneyNumber_"+su+"'  style='width:100px' />"//税额
	cell11.innerHTML = "<input   name='intaxmoneyNumber_"+su+"' id='intaxmoneyNumber_"+su+"'  style='width:100px' />"//含税金额 */
	cell13.innerHTML = "<input   name='remark_"+su+"' id='remark_"+su+"'  style='width:100px' />"//备注
	var index = document.getElementById("fixedThead").getElementsByTagName('tr').length;
	su++;
}

function calcSum() {
	var valueTable = document.getElementById("fixedThead");
	var table_tr = valueTable.getElementsByTagName('tr');
	// lookupCodeArr = [];
	var sumAmount = 0.00;
	for (var i = 1; i < table_tr.length; i++) {
		var inputParam = table_tr[i].getElementsByTagName('input');
		// 行的金额
		sumAmount = Number(sumAmount) + Number(inputParam[12].value);
	}
	$("#TOTAL_AMOUNT").val(sumAmount);
}

function sum(su){
	
	var quantity="quantity_"+su;
	var salesUnitPrice="salesUnitPrice_"+su;
	var constructionCost1="constructionCost1_"+su;
	var constructionCost3="constructionCost3_"+su;
	var reg = /^[0-9]+[0-9]*$/;
	/*if(!reg.test($("#"+quantity+"").val()) && !reg.test($("#"+salesUnitPrice+"").val())&& !reg.test($("#"+constructionCost3+"").val())&& !reg.test($("#"+constructionCost1+"").val()) ){
		//$.messager.alert('提示',"输入不合法，请输入数字！",'info');
		alert("输入不合法，请输入数字！");
		return false;
	}*/
	
	var totalAmount= $("#"+quantity+"").val() * $("#"+salesUnitPrice+"").val() ;
	if($("#"+constructionCost1+"").val()!=""){
		totalAmount=totalAmount+parseFloat($("#"+constructionCost1+"").val());
	}
	if($("#"+constructionCost3+"").val()!=""){
		totalAmount=totalAmount+parseFloat($("#"+constructionCost3+"").val());
	}
	$("#totalAmount_"+su).val(totalAmount);
	
	calcSum();
}

//物料类别需要用到的变量
var matParams = {};
var matCurrent = {};
var matDefaultPageSize = 10;
var matCurrentPage = 1;
var matPageSize = matDefaultPageSize;
var matOption = {};
function finishedGoods(obj){
	wl=obj;
	matOption.url = webUrl+'chwMateriel/findchwMateriel.do';
	matOption.type="wuliao";				//div名称前缀user_dialogbox
	matOption.table="wuliaoGrid";	//div中table表名
	matOption.obj="wuliao";				//回调方法中传值做标识
	//matParams.typeCode="MaterielCode";
	var materielName=$("#materielName").val();
	//var materielTypeName=$("#materielTypeName").val();
	if(materielName!=""){
		matParams.materielName=materielName;
	}
	/*if(materielTypeName!=""){
		matParams.materielTypeName=materielTypeName;
	}*/
	matOption.columns = [
	                  {field:'materielId',checkbox:true},
			          {field:'_itemNo',title:'序号',align:'center',width:50,formatter:formatId},
			          {field:'materielName',title:'物料名称',align:'center',width:150,sortable:true},
			          {field:'segment1',title:'物料编码',align:'center',width:150,sortable:true},
			          {field:'materielVersionNum',title:'版本编号',align:'center',width:80,sortable:true},
			          {field:'materielVersionName',title:'版本名称',align:'center',width:150,sortable:true},
			          {field:'materielVersionModel',title:'版本型号',align:'center',width:150,sortable:true},
			      ];
	matOption.onSelect=function(rowIndex, rowData){ 
	
	$("#finishedGoodsName_"+wl).val(rowData.materielName);
	$("#finishedGoodsId_"+wl).val(rowData.materielId);
	$("#segment1_"+wl).val(rowData.segment1);
	$("#materielVersionNum_"+wl).val(rowData.materielVersionNum);
	$("#materielVersionName_"+wl).val(rowData.materielVersionName);
	$("#materielVersionModel_"+wl).val(rowData.materielVersionModel);
	};
	matLov(matOption);
}


function goback(obj){
	/*if(obj=="customer"){
		var customerId= $('input[name="customerId"]:checked').val();
		$("#customerId").val(customerId);
	}*/
}

function saveContractHeader(){
	var json = {};
	json.chwContractHeader = {};
	json.chwContractHeader.contractNum=$("#contractNum").val();
	if($("#signingDate").datebox('getValue')!=""){
		json.chwContractHeader.signingDate=$("#signingDate").datebox('getValue');
	}
	if($("#implementDate").datebox('getValue')!=""){
		json.chwContractHeader.implementDate=$("#implementDate").datebox('getValue');
	}
	if($("#paramValue").datebox('getValue')!=""){
		json.chwContractHeader.completionDate=$("#paramValue").datebox('getValue');
	}
	if($("#contractHeaderId").val()!=""){
		json.chwContractHeader.contractHeaderId=$("#contractHeaderId").val();
	}
	json.chwContractHeader.remark=$("#remark").val();
	json.chwContractHeader.customerId=$("#customerId").val();
	json.chwContractHeader.paymentTermId=$("#paymentTermId").val();
	json.chwContractHeader.customerName=$("#customerName").val();
	json.chwContractHeader.status=$("#status").combobox("getValue");
	json.chwContractHeader.salesmanId=$("#salesmanId").val();
	json.chwContractHeader.salesmanName=$("#salesmanName").val();
	json.chwContractLine = [];
	var valueTable = document.getElementById("fixedThead");
	var table_tr = valueTable.getElementsByTagName('tr');
	for ( var i = 1; i < table_tr.length; i++) {
		var inputParam = table_tr[i].getElementsByTagName('input');
		var selectParam = table_tr[i].getElementsByTagName('select');
		var Values = {};
		values={
				"contractLineNum":inputParam[1].value,
				"finishedGoodsId":inputParam[3].value,
				"quantity":inputParam[8].value,
				"salesUnitPrice":inputParam[9].value,
				"constructionCost1":inputParam[10].value,
				/*"constructionCost2":inputParam[6].value,*/
				"constructionCost3":inputParam[11].value,
				"totalAmount":inputParam[12].value,
				/*"taxRate":selectParam[0].value,
				"taxmoneyNumber":inputParam[9].value,
				"intaxmoneyNumber":inputParam[10].value,*/
				"remark":inputParam[13].value,
				"contractLineId":inputParam[13].value
		};
		json.chwContractLine.push(values);
	}
	json=JSON.stringify(json);
	if( $("#signingDate").datebox('getValue')=="" || $("#status").combobox("getValue")==""){
		alert("*号为必填项！");
	}else if(checknull("contractNum") && checknull("customerId") && checknull("paymentTermId")){
		$.ajax({
			url: webUrl+'contractHeader/updateChwHeader.do',
			type:'post',
			data:{param:json}
		}).done(function(data){
			var result = data.bo;
			if(result==0){
				$.messager.confirm('提示 ', '修改成功！', function(r){
				    $('.main_panel').load(webUrl+"public/page/contract/contractQuery.html");
				});
			}else{
				$.messager.alert('提示 ', '修改失败！', 'info');
			}
		});
	}
}


//付款条款需要用到的变量
var paymentParams = {};
var paymentCurrent = {};
var paymentDefaultPageSize = 10;
var paymentCurrentPage = 1;
var paymentPageSize = paymentDefaultPageSize;
var paymentOption = {};
function payment(){
	paymentOption.url = webUrl+'sysParams/getSysParamsList.do';
	paymentOption.type="fk";				//div名称前缀user_dialogbox
	paymentOption.table="fkGrid";	//div中table表名
	paymentOption.obj="fk";				//回调方法中传值做标识
	paymentParams.typeCode="FK";
	var paramValue=$("#paymentTermName").val();
	if(paramValue!=""){
		paymentParams.paramValue=paramValue;
	}
	paymentOption.columns = [
	                  {field:'id',checkbox:true},
			          {field:'_itemNo',title:'序号',align:'center',width:50,formatter:formatId},
			          {field:'param_value',title:'付款名称',align:'center',width:150,sortable:true},
			      ];
	paymentOption.onSelect=function(rowIndex, rowData){ $("#paymentTermId").val(rowData.param_value);};
	paymentLov(paymentOption);
}

//人员LOV用到的变量 (采购员)
var employeeParams = {};
var employeeCurrent = {};
var employeeDefaultPageSize = 10;
var employeeCurrentPage = 1;
var employeePageSize = employeeDefaultPageSize;
var employeeOption = {};
function employee(){
	employeeOption.url = webUrl+'chwEmployee/findEntity.do';
	employeeOption.type="buyer";				//div名称前缀user_dialogbox
	employeeOption.table="buyerGrid";	//div中table表名
	var paramValue=$("#employeeNameQuery").val();
	if(paramValue!=""){
		employeeParams.employeeName=paramValue;
	}
	employeeOption.columns = [ {field : 'employeeId',checkbox : true	}, 
	{field : '_itemNo',	title : '序号',	align : 'center',	width : 50,	formatter : formatId}, 
	{field : 'employeeName',title : '姓名',	align : 'center',	width : 150,sortable : true	}, 
	{field : 'employeeSex',	title : '性别',	align : 'center',	width : 150,sortable : true,}, ];
	employeeOption.onSelect=function(rowIndex, rowData){ $("#salesmanName").val(rowData.employeeName);$("#salesmanId").val(rowData.employeeId); };
	employeeLov(employeeOption);
}